
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CNCS饰品分析系统 - 注册</title>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/stlyes.css">
</head>

<body class="min-h-screen flex items-center justify-center p-4 relative">
<!-- 背景图片容器 -->
<div class="bg-container absolute inset-0 z-0 overflow-hidden">
    <div class="bg-image absolute inset-0 bg-cover bg-center"
         style="background-image: url('/img/img.jpg'); filter: blur(8px) brightness(0.7); transform: scale(1.05);">
    </div>
</div>

<div class="login-container relative z-10 max-w-md w-full mx-auto">
    <!-- 注册框 -->
    <div
            class="card bg-white/95 rounded-xl shadow-2xl overflow-hidden transition-all duration-300 hover:shadow-3xl hover:-translate-y-1">
        <div class="content-padding">
            <div class="logo-container">
                <i class="fa fa-user-plus logo-icon"></i>
            </div>
            <h2 class="title">CNCS饰品分析系统</h2>
            <p class="subtitle">注册您的账号</p>

            <!-- 注册表单 -->
            <form id="register-form" action="/register" method="post">
                <div class="form-group">
                    <label for="reg-username" class="form-label">用户名</label>
                    <div class="input-container">
                        <i class="fa fa-user input-icon"></i>
                        <input type="text" id="reg-username" name="username" class="form-input" placeholder="请输入用户名" required>
                    </div>
                </div>

                <div class="form-group">
                    <label for="reg-password" class="form-label">密码</label>
                    <div class="input-container">
                        <i class="fa fa-lock input-icon"></i>
                        <input type="password" id="reg-password" name="password" class="form-input" placeholder="请输入密码" required>
                    </div>
                </div>
                <c:if test="${not empty result}">
                    <div class="message-box">
                        <ul>
                                ${result}
                        </ul>
                    </div>
                </c:if>
                <button type="submit" class="btn btn-primary w-full">
                    <i class="fa fa-user-plus mr-2"></i>立即注册
                </button>

                <div class="mt-4 text-center">
                    已有账号？<a href="/login.jsp">去登录</a>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>

